<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>雷达图</title>
</head>
<body>
	
	<div id="mainFour" style="width: 100%; height: 400px;"></div>
	<script src="../../res/layui.all.js" charset="utf-8"></script>
	<script type="text/javascript">
		
		function findAllFour() {

			var url = "../../cartogram/findLeiAll.action";
			var data = {
				"year" :$("#year").val()
			};
			$.post(url, data, function(mes) {
				findcartogramFour(mes);
			}, "json");

		}

		function findcartogramFour(mes) {
			// 基于准备好的dom，初始化echarts实例
			var myChart = echarts.init(document.getElementById('mainFour'));

			option = {
				    title: {
				        text: ''+$("#year").val()+'业绩前五商品业务统计图',
				        x : 'center'
				    },
				    legend: {
				    	top:50,
				    	right : 'right',
				        data:mes.name
				    },
				    radar: [
				        {
				            indicator: [
				            	{text: '1月', max:80},
				            	{text: '2月', max:80},
				            	{text: '3月', max:80},
				            	{text: '4月', max:80},
				            	{text: '5月', max:80},
				            	{text: '6月', max:80},
				            	{text: '7月', max:80},
				                {text: '8月', max:80},
				                {text: '9月', max:80},
				                {text: '10月', max:80},
				                {text: '11月', max:80},
				                {text: '12月', max:80},
				            ],
				            center: ['25%','40%'],
				            radius: 80
				        }
				    ],
				    series: [
				        {
				            type: 'radar',
				             tooltip: {
				                trigger: 'item'
				            },
				            itemStyle: {normal: {areaStyle: {type: 'default'}}},
				            data:mes.list
				        }
				    ]
				};

			// 使用刚指定的配置项和数据显示图表。
			myChart.setOption(option);
		}
	</script>
</body>
</html>